function sales_manager() {
	$.ajax({
		type: "GET",
		url: "/sales_manager",
		success: function (result) {
		data=result.data
	var sales_data=[];
	var profit_data=[];
	var names=[];
	for (i=0;i<data.length;i++){
		temp={};
		temp1={};
		temp['value']=data[i].sales;
		temp['name']=data[i].sales_manager;
		temp1['value']=data[i].profit;
		temp1['name']=data[i].sales_manager;
		sales_data.push(temp);
		profit_data.push(temp1);
		names.push(data[i].sales_manager);
	}
	console.log([names,sales_data,profit_data])
	var myChart = echarts.init(document.getElementById('data_manager'));

option = {
	color: ["#EAEA26", "#906BF9", "#FE5656", "#01E17E", "#3DD1F9", "#FFAD05"],
    title: {
        text: '           销售情况                                          利润情况',
        left: 'left',
 		textStyle:{
 			color:'#0099FF',
 			fontSize:10,
 		}
    },
    tooltip: {
        trigger: 'item',
        formatter: '{a} <br/>{b} : {c} ({d}%)'
    },
    legend: {
        left: 'center',
        top: 'bottom',
        data: names,
        textStyle:{
        	color:["#EAEA26", "#906BF9", "#FE5656", "#01E17E", "#3DD1F9", "#FFAD05"],
        },
        padding:0,
        itemGap:3,
        itemWidth:30,


    },
    series: [
        {
            name: '销售额',
            type: 'pie',
            radius: [5, 85],
            center: ['30%', '50%'],
            roseType: 'area',
            label: {
                show: false
            },
            labelLine: {
	            normal: {
	                show: false,
	            },
	            emphasis: {
	                show: false
	            }
	        },
            emphasis: {
                label: {
                    show: false
                }
            },
            data: sales_data,
        },
        {
            name: '利润',
            type: 'pie',
            radius: [5, 85],
            center: ['80%', '50%'],
            roseType: 'area',
            label:{
            	show:false,
            },
            labelLine: {
		            normal: {
		                show: false,
		            },
		            emphasis: {
		                show: false
		            }
		        },
            data: profit_data,
        }
    ]
};
	myChart.setOption(option);
	var currentIndex = -1;
	var pie_index=-1;
	var pie_index1=0
	setInterval(function () {
	    var dataLen = option.series[1].data.length;
	    pie_index=pie_index==11?0:(pie_index+1)
//	    console.log(currentIndex1)
	    // 取消之前高亮的图形
	    myChart.dispatchAction({
	        type: 'downplay',
	        seriesIndex: pie_index1,
	        dataIndex: currentIndex
	    });
	    currentIndex = (currentIndex + 1) % dataLen;
	    pie_index1=parseInt(pie_index/6)
	    // 高亮当前图形
	    myChart.dispatchAction({
	        type: 'highlight',
	        seriesIndex: pie_index1,
	        dataIndex: currentIndex
	    });
	    // 显示 tooltip
	    myChart.dispatchAction({
	        type: 'showTip',
	        seriesIndex: pie_index1,
	        dataIndex: currentIndex
	    });
	}, 2000);

		}
	});
}